Authentication Message
Before You Start
You need to meet all the prerequisites listed in the Before You Start section of the documentation.
Process authentication template message
If you want to process authentication message then add auth_message inside metadata and set it to true.
Step 1: Make POST Request
Payload
{
"recipient_type": "individual",
"to": "<user number>",
"type": "template",
"template": {
"name": "<template name>",
"language": {
"policy": "deterministic",
"code": "<language>"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "<one-time-password>"
}
]
},
{
"type": "button",
"index": "0",
"sub_type": "url",
"parameters": [
{
"type": "text",
"text": "<one-time-password>"
}
]
}
]
},
"metadata": {
"auth_message": true
}
}
Step 2: Check Your Response
The response example shows a sample response from the API request: Possible elements in responses includes
- Success Response
Payload
{
"success": true,
"responseId": "1606887827245734233232332"
}
- An unsuccessful response contains an error message. See Error and Status Codes for more information.
For more details, please refer https://developers.facebook.com/docs/whatsapp/business-management-api/authentication-templates/.